package com.qding.park.manager.facade.core.service.common;

import java.util.Date;

import com.qding.park.common.core.exceptions.BaseException;
import com.qding.park.common.core.exceptions.business.adapter.AdapterException;
import com.qding.park.common.core.exceptions.business.manager.adapterfactory.AdapterProxyCreateFail;
import com.qding.park.common.core.exceptions.business.manager.service.ServiceCoreException;
import com.qding.park.manager.common.pojo.ParkDataResult;
import com.qding.park.manager.pojo.ReserveParams;
import com.qding.park.manager.pojo.TbReserve;
import com.qding.park.manager.pojo.ap.ApReservationInReminder;
import com.qding.park.manager.pojo.example.TbReserveExample;

/**
 * @ClassName ReserveCommonFacade
 * @Description TODO(预定公共  service层)
 * @author LeiYang
 * @Date 2017年5月5日 下午4:25:03
 * @version 1.0.0
 */
public interface ReserveCommonFacade {
    
    /**
     * @param example  统计条件
     * @param jumpPage  当前页码
     * @param pageLength 当前页长度
     * @return
     * 根据统计条件 分页查询预定列表
     */
    ParkDataResult list(TbReserveExample example,int jumpPage,int  pageLength);
    
    void reservePayedIssuedFailRollBack(TbReserve tbReserve);

    /**
      * reserveParams_set(设置预定参数)
      *
      * @Title: reserveParams_set
      * @Description: TODO
      * @param @param params
      * @param @param parkId
      * @param @return    设定文件
      * @return ParkDataResult    返回类型
      * @throws
      */
    ParkDataResult reserveParams_set(ReserveParams  params ,int parkId);
    
    /**
     * @Description (根据北京用户id 查询用户名下所有的预定单)
     * @param bjuserid
     * @return
     * @throws ParkManagerCoreServerException
     */
    ParkDataResult queryReservesByBjuserId(String bjuserid) throws ServiceCoreException ;
    
    
    /**
     * queryReserveParamsByParkId(根据车场id 查看车场的预定参数)
     *
     * @Title: queryReserveParamsByParkId
     * @Description: TODO
     * @param @param parkId
     * @param @return    设定文件
     * @return ReserveParams    返回类型
     * @throws
     */
   ParkDataResult reserveParams(int parkId) throws BaseException;
   
   /**
    * @Description (根据id 查询预定详情)
    * @param reserveId
    * @return
    * @throws ParkManagerCoreServerException
    */
   ParkDataResult queryReservesInfoById(String reserveId);
   
   
   /**
    * @Description (查询所属预定单)
    * @param supplyID 供应商id
    * @param parkCode 车场　提供的车场编码
    * @param carNum 车牌
    * @return
    */
   TbReserve queryReservedByBjuserId(int supplyID,String parkCode,String carNum);
   
   /**
    * @Description (预定车场入场)
    * @param tbReserve
    * @param inRoom
    * @param inDateTime
    */
   void carInCheck(ApReservationInReminder apReservationInReminder)throws BaseException;
   
   /**
    * @Description (预定单超时)
    * @param tbReserve
    */
   void reserveTimeOut(TbReserve tbReserve) throws AdapterProxyCreateFail, AdapterException ;
   
   
   /**
     * reserveDelayTimeOut(预定延期超时)
     *
     * @Title: reserveDelayTimeOut
     * @Description: TODO
     * @param @param tbReserve
     * @param @throws BaseException    设定文件
     * @return void    返回类型
     * @throws
     */
   void reserveDelayTimeOut(TbReserve tbReserve)throws BaseException;
   
   /**
     * reservePayed(预定单支付已完成)
     *
     * @Title: reservePayed
     * @Description: TODO
     * @param @param tbReserve
     * @param @throws BaseException    设定文件
     * @return void    返回类型
     * @throws
     */
   void reservePayedHandle(TbReserve tbReserve)throws BaseException;
   
   ParkDataResult createReserveOrder(String bjuserId,int parkId,String carNum,Date reserveStartTime) throws BaseException;
   
   ParkDataResult cancelResecancelById(String reserveId)throws BaseException;

}
